<?php

/*
	Class: BlogCategoriesTags

	About: Author
		Jaybill McCarthy

	About: License
		<http://communit.as/docs/license>


*/
class BlogCategoriesTags extends Blog_Db_Table{

    protected $_name 	= 'blog_categories_tags';
    protected $_primary = array('category_id','tag');
    
    function getTagsByCategoryId($category_id){
    	$out = array();	    	
    	$cat_tags = $this->fetchAll($this->select()->where("category_id = ?",$category_id));
    	if(count($cat_tags) > 0){
   			foreach($cat_tags as $cat_tag){
   				$out[] = $cat_tag->tag;
   			}
    	}    	
    	return $out;
    }
    
        
    
}